#include "gdn/Sound.h"

namespace gdn
{
	void Sound::Play()
	{
		sound.Play();
	}

	void Sound::Pause()
	{
		sound.Pause();
	}

	void Sound::Stop()
	{
		sound.Stop();
	}

	bool Sound::IsPlaying() const
	{
		return ( sound.GetStatus() == sf::Sound::Playing );
	}

	void Sound::SetLoop( bool theLoop )
	{
		sound.SetLoop( theLoop );
	}

	bool Sound::GetLoop() const
	{
		return sound.GetLoop();
	}

	void Sound::SetOffset( float theOffset )
	{
		sound.SetPlayingOffset( theOffset );
	}

	float Sound::GetOffset() const
	{
		return sound.GetPlayingOffset();
	}

	void Sound::SetVolume( float theVolume )
	{
		sound.SetVolume( theVolume );
	}

	float Sound::GetVolume() const
	{
		return sound.GetVolume();
	}

	void Sound::SetSoundBuffer( const SoundBuffer& theSoundBuffer )
	{
		sound.SetBuffer( theSoundBuffer.soundBuffer );
	}
}
